package com.frxuexi.park2212.payment

import androidx.databinding.DataBindingUtil
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.frxuexi.lib_base.entity.PayBeanItem
import com.frxuexi.park2212.R
import com.frxuexi.park2212.databinding.ItemPaylistBinding

class PayAdapter : BaseQuickAdapter<PayBeanItem, BaseViewHolder>(R.layout.item_paylist) {
    lateinit var binding: ItemPaylistBinding
    override fun onItemViewHolderCreated(viewHolder: BaseViewHolder, viewType: Int) {
        super.onItemViewHolderCreated(viewHolder, viewType)
        DataBindingUtil.bind<ItemPaylistBinding>(viewHolder.itemView)
    }

    override fun convert(helper: BaseViewHolder, item: PayBeanItem) {
        binding = DataBindingUtil.getBinding<ItemPaylistBinding>(helper.itemView)!!
        binding.bean = item
    }
}